
// 引入 "mongoose" 依赖
const mongoose = require('mongoose');
// 连接数据库：h51806
mongoose.connect('mongodb://localhost/sanren');

// Schema-数据结构：用户
const kunsSchema = new mongoose.Schema({
	hao: Number,
	name: String,
	style: String,
	number:Number
	
	
});
const rusSchema = new mongoose.Schema({
	hao: Number,
	name: String,
	style: String,
	inum:Number,
	time:Date
	
});
const chusSchema = new mongoose.Schema({
	hao: Number,
	name: String,
	style: String,
	onum:Number,
	time:Date
	
});

// Schema-数据结构：职位


// Model-集合：用户
const Kuns = mongoose.model('kuns', kunsSchema); // 对应 "users" 集合
/// 对应 "positions" 集合
const Rus = mongoose.model('rus', rusSchema);
const Chus = mongoose.model('chus', chusSchema);

module.exports = {Kuns,Rus,Chus};